package com.zhang.controller;

import com.zhang.pojo.TypeBean;
import com.zhang.service.ITypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "类别控制接口")
@RestController
@RequestMapping("type")
public class TypeController {

    @Autowired
    private ITypeService typeService;


    @ApiOperation("查询所有类别")
    @GetMapping("findAll")
    public List<TypeBean> findAll(){
      return typeService.findAll();
    }
}
